﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MainTemplate.Master" AutoEventWireup="true" CodeBehind="AuthorList.aspx.cs" Inherits="AlexandriaPressWebsite.MasterPages.WebForm11" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainDoc" runat="server">

<asp:GridView ID="gridAuthorList" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID,Email" AllowPaging="True" CssClass="grid" PageSize="10" OnPageIndexChanging = "gridAuthorList_OnPageIndexChanging">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="cbSelect" runat="server" />
                        </ItemTemplate>
                     </asp:TemplateField>
                     <asp:TemplateField HeaderText="Profile Picture">
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ProfilePic") %>' AlternateText="Profile Picture" CssClass="smallImage3" />

                        </ItemTemplate>                
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="User ID" visible="false" >
                        <ItemTemplate>
                        <asp:Label id="lblID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ID") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Author's Name">
                        <ItemTemplate>
                            <asp:Label id="lblFName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>'></asp:Label>
                        </ItemTemplate>
                     </asp:TemplateField>
                     <asp:TemplateField HeaderText="Email">
                        <ItemTemplate>
                            <asp:Label id="lblEmail" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Email") %>'></asp:Label>
                        </ItemTemplate>
                     </asp:TemplateField>
                    <asp:TemplateField HeaderText="Joining Date">
                        <ItemTemplate>
                        <asp:Label id="lblDate" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "DateJoined") %>'></asp:Label>
                        </ItemTemplate>
                     </asp:TemplateField>
                </Columns>
                <PagerStyle CssClass="pager" />
            </asp:GridView>


    <asp:Label ID="lblCheck" runat="server" ForeColor="Red" CssClass="label"></asp:Label>


    <table style="width:100%;">
        <tr>
            <td>


                <asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DropDownList4_SelectedIndexChanged" 
                    CssClass="secondaryList">
                    <asp:ListItem></asp:ListItem>
                    <asp:ListItem>Ban User</asp:ListItem>
                    <asp:ListItem>Suspend User</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>


                <asp:Label ID="Label2" runat="server" Text="Reason/Comment:" CssClass="label"></asp:Label>
            </td>
            <td>


                <asp:Label ID="Label1" runat="server" Text="End of Suspension" CssClass="label"></asp:Label>
            </td>
        </tr>
        <tr>
            <td width="350">


    <asp:TextBox ID="TextBox3" runat="server" Height="103px" Width="176px" 
                    ontextchanged="TextBox3_TextChanged" AutoPostBack="True" 
                    CssClass="textRegion" ValidationGroup="Suspend, "></asp:TextBox>


                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="TextBox3" ErrorMessage="*" ValidationGroup="Suspend"></asp:RequiredFieldValidator>


                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                    ControlToValidate="TextBox3" ErrorMessage="*" ValidationGroup="Ban"></asp:RequiredFieldValidator>
            </td>
            <td width="350">


                <asp:Calendar ID="Calendar1" runat="server" Width="232px" CssClass="calendar" 
                    onselectionchanged="Calendar1_SelectionChanged"></asp:Calendar>
                        <asp:Label ID="lblDOS" runat="server" Text="Invalid Date of Suspension" 
                    CssClass="label" ForeColor="Red"></asp:Label>
                    </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center" >


    <asp:Button ID="btnBan" runat="server" Text="Ban" onclick="btnBan_Click" 
                    ValidationGroup="Ban" CssClass="genericButton" />
    <asp:Button ID="btnSuspend" runat="server" Text="Suspend" onclick="btnSuspend_Click" 
                    ValidationGroup="Suspend" CssClass="genericButton" />
            </td>
        </tr>
        </table>
    <br />

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="formDoc" runat="server">
</asp:Content>
